/*
 * 标题:          农务数据库检索系统
 * 
 * 描述:  		  以mysql为数据库，远程连接数据库进行水稻、 小麦、昆虫等数据库的检索
 * 
 * 备注:			 demo开头的html、jsp和java文件均为测试用例，无实际效用
 *
 * Copyright (c) 2017, Nanjing Agricultural University, China
 */

package cn.edu.njau.ads.control;

import cn.edu.njau.ads.db.RiceDB;
import cn.edu.njau.ads.model.Rice;
import cn.edu.njau.ads.util.AppException;

/**
 * 水稻检索服务类
 * 
 * @author zzy
 *
 */
public class RiceControl {
	// 初始化昆虫数据访问类
	private RiceDB riceDB = new RiceDB();
	
	public Rice[] SearchRice(String unify_id,String name_cn,String place,String family,String genus,String species) throws AppException{
		Rice[] rices = null;
		try {
			rices = riceDB.getRices(unify_id,name_cn,place,family,genus,species);
		} catch (AppException e) {
			e.printStackTrace();
			throw new AppException("cn.edu.njau.zzy.control.RiceControl.SearchRice");
		}
		return rices;
	}
}
